<template>
	<view>
		<my-modal ref="loginModal"></my-modal>
	</view>
</template>

<script>
	import { login } from '@/utils/login.js'
	export default {
		name: "LoginPopup",
		data() {
			return {
				
			};
		},
		methods: {
			close() {
				this.$refs.loginModal.close()
			},
			confirm() {
				login()
				this.close()
			},
			toShow(type) {
				this.$refs.loginModal.open({
					content: type == 1 ? 'You are not logged in, please log in and operate' : 'The user has been blocked. Please contact the administrator',
					confirmText: type == 1 ? 'login' : 'ok',
					showCancelButton: false,
					zIndex: 99999,	// 登录弹窗层级置顶
					success: () => {
						this.confirm()
					},
					cancel: () => {
						console.log('modal cancel')
					}
				})
			},
			
		}
	}
</script>

<style lang="scss">
	
</style>